package com.hgw.Demo09_StrategyPattern.examples;

/**
 * Data time:2021/12/20 20:50
 * StudentID:2019112118
 * Author:hgw
 * Description: 客户端测试类
 */
public class Client {
    public static void main(String[] args) {
        MovieTicket mt = new MovieTicket();
        double originalPrice = 60;
        double currentPrice;

        mt.setPrice(originalPrice);
        System.out.println("原始价为：" + originalPrice);
        System.out.println("------------------------------------");

        Discount discount;
        discount = new VIPDiscount();
        mt.setDiscount(discount);

        currentPrice = mt.getPrice();
        System.out.println("打折后价格为：" + currentPrice);
    }
}
